package com.villaday.idf.activity;

import androidx.fragment.app.FragmentManager;import androidx.fragment.app.FragmentTransaction;

import com.villaday.idf.R;
import com.villaday.idf.base.BaseActivity;
import com.villaday.idf.fragment2.FindHouse2Fragment;

/*
 *
 * 酒店 民宿 别墅
 * */
public class JDMSBSActivity extends BaseActivity {
    FragmentManager fragmentManager;


    @Override
    protected int getViewResId() {
        return R.layout.activity_jdmsbs;
    }

    @Override
    protected void init() {
        int type = getIntent().getIntExtra("type", 0);
        if (fragmentManager == null) {
            fragmentManager = getSupportFragmentManager();

        }
        FragmentTransaction transaction = fragmentManager.beginTransaction();
        FindHouse2Fragment bournFragment = FindHouse2Fragment.instance(type);
        //直接跳转到别墅
        transaction.add(R.id.fl_main, bournFragment, "2");
        transaction.commitAllowingStateLoss();


    }

    @Override
    public void onBackPressed() {
        if (!BackHandlerHelper.handleBackPress(this)) {
            super.onBackPressed();
        }
    }
}
